public class Numbers
{
   /**
      Computes the number of even and odd values in a given array
      @param values an array of integer values
      @return an array of length 2 whose 0 entry contains the count
      of even elements and whose 1 entry contains the count of odd
      values
   */
   public int[] evenOdds(int[] values)
   {
      int e[]=new int[2];
      int n=values.length,x=0,y=0;
      for(int i=0;i<n;i++){
         if(values[i]%2==0)
            x++;
         else y++;
      }
      e[0]=x;
      e[1]=y;
      return e;
   }
}